<!doctype html>
<html lang="">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Vite App</title>
    <style></style>
  </head>
  <body>
    <div id="app" @click="message+='s'">
      <!-- 如果给标签属性设置的不是字符串，一定要加v-bind -->
      <img v-bind:src="url" alt="图片" style="width: 300px" />
      <button
        @click="url='https://ts1.cn.mm.bing.net/th?id=ORMS.e1d4fe9751d3fa6d67e8e23f08d66f2f&pid=Wdp&w=612&h=304&qlt=90&c=1&rs=1&dpr=2&p=0'"
      >
        点我换图
      </button>
    </div>
    <script src="./vue.js"></script>
    <script>
      new Vue({
        el: '#app',
        data: {
          url: 'https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msOOR.img',
        },
        methods: {
          add(e, num) {
            e.preventDefault()
            this.age += num
          },
        },
      })
    </script>
  </body>
</html>
